package com.ynet.middleground.contract;

import org.apache.dubbo.config.spring.context.annotation.DubboComponentScan;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.apache.dubbo.config.spring.context.annotation.EnableDubboConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.context.annotation.ImportResource;

import com.ynet.middleground.contract.mq.Sink;
import com.ynet.middleground.contract.mq.SinkTest;

@EnableDubbo
@EnableDubboConfig
@EnableBinding({Sink.class, SinkTest.class})
@DubboComponentScan("com.ynet.middleground.contract.service")
@ImportResource("classpath:dubbo-provider.xml")
@SpringBootApplication
public class ContractApplication {
    @Value("${spring.server.port}")
    private int serverPort;
    @Value("${spring.application.name}")
    private String applicationName;

    public static void main(String[] args) {
        SpringApplication.run(ContractApplication.class, args);
    }
}
